import Login from '../pages/Login/Login'
import Main from '../pages/Main/Main'
import Home from '../pages/Home/Home'
import GoodsList from '../pages/Goods/List/List'
import GoodsAdd from '../pages/Goods/addGoods'
import OrdersList from '../pages/OrderList/OrderList'
import PersonStaff from '../pages/PersonStaff/PersonStaff'
import PersonUser from '../pages/PersonUser/PersonUser'
import SupplierList from '../pages/SupplierList/SupplierList'

export default [
    {
        path:'/',
        name:'Login',
        redirect:'/Login',
        meta:{require:false}
    },
    {
        path:'/Login',
        name:'Login',
        component:Login,
        meta:{require:false}
    },
    {
        path:'/Main',
        name:'Main',
        redirect:'/Main/Home',
        component:Main,
        meta:{require:true},
        role:['admin','user1','user2'],
        children:[
            {
                path:'/Main/Home',
                name:'首页',
                component:Home,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
            // {
            //     path:'/Main/Goods',
            //     name:'商品管理',
            //     // redirect:'/Main/Goods/List',
            //     // component:Goods,
            //     meta:{require:true},
            //     role:['admin','user1','user2'],
            // },
            {
                path:'/Main/Goods/List',
                name:'零售商品列表',
                component:GoodsList,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
            {
                path:'/Main/Goods/Add',
                name:'新增零售商品',
                component:GoodsAdd,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
            // {
            //     path:'/Main/Orders',
            //     name:'订单管理',
            //     component:Orders,
            //     redirect:'/Main/Orders/List',
            //     meta:{require:true},
            //     role:['admin','user1','user2'],
            //     children:[
            //
            //     ]
            // },
            {
                path:'/Main/Orders/List',
                name:'订单列表',
                component:OrdersList,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
            // {
            //     path:'/Main/Person',
            //     name:'人员管理',
            //     component:Person,
            //     redirect:'/Main/Person/Staff',
            //     meta:{require:true},
            //     role:['admin','user1','user2'],
            //     children:[
            //
            //     ]
            // },
            {
                path:'/Main/Person/Staff',
                name:'员工列表',
                component:PersonStaff,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
            {
                path:'/Main/Person/User',
                name:'用户列表',
                component:PersonUser,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
            // {
            //     path:'/Main/Supplier',
            //     name:'供应商管理',
            //     component:Supplier,
            //     redirect:'/Main/Supplier/List',
            //     meta:{require:true},
            //     role:['admin','user1','user2'],
            //     children:[
            //
            //     ]
            // },
            {
                path:'/Main/Supplier/List',
                name:'供应商列表',
                component:SupplierList,
                meta:{require:true},
                role:['admin','user1','user2'],
            },
        ]
    }
]